<!doctype html>
<html>
<head>
<include file="public:head" />
 
<link rel="stylesheet" href="http://st.mizhe.com/static/pro/brand_martshow_detail-1731d8c9db.css" type="text/css" media="all" />
<link rel=stylesheet type=text/css href="__STATIC__/itaoke_mizhe/css/common.css" />
</head>
<body>
<include file="public:header" />
<style>
.shop-item-wrap .item-lists li {height: 230px;}
.shop-item-wrap .item-lists li .img-box {height: 152px;}
.shop-item-wrap .item-lists li .img-box img.lazy {height: 152px;}
.price-box .price-info {height: 30px;}
.view-shop-wrap .banner-top-box {height: 251px;}
.view-shop-wrap .banner-top-box .img-box {height: 251px;}
.view-shop-wrap .banner-top-box .brand-main-img {height: 251px;}
.view-shop-wrap .brand-info-box .price-box {top: 208px;}
.brand-info-box .info-text-box {height: 40px;}
</style>

<div id="container">
<div class="view-shop-wrap">
	<!-- 品牌头部banner -->
	<div class="banner-top-box">
		<div class="img-box">
			<img class="brand-main-img" src="{$brand['newpic']}">
		</div>
		<div class="brand-info-box">
			<div class="brand-info-countdown">
				<span class="iconfont"></span>

				<if condition="$brand['start_time'] egt time()">
					<span class="countdown-label">活动开始时间：</span>
				<span class="countdown-container endtime" data-time="{$brand['start_time']}" data-id="s0" id="end_date_s0">0<em class="d">0</em>天<em class="h">0</em>小时<em class="m">0</em>分<em class="s">0</em>秒</span>
				<else />
					<span class="countdown-label">本场剩余：</span>
				<span class="countdown-container endtime" data-time="{$brand['end_time']}" data-id="s0" id="end_date_s0">0<em class="d">0</em>天<em class="h">0</em>小时<em class="m">0</em>分<em class="s">0</em>秒</span>
				</if>

			</div>
			<h1><a>{$brand['title']}</a></h1>
			<span class="info-text-box">
				<span class="info-text">{$brand['desc']}</span>
			</span>
			<div class="price-box"><span class="price-info"><span class="pj-text-wrap"><span class="iconfont-brand">&#xe603;</span> </span></span></div>
		</div>
	</div>

    <!-- 商品列表 -->
    <div class="shop-item-wrap">
		<ul class="item-lists infinite-scroll">
		<volist name="items_list" id="item" key="i" mod="4">
			<li class="brand-item ">
				<div class="img-box">
					<a href="{:U('jump/index',array('iid'=>$item['num_iid']))}" rel="nofollow" target="_blank">
						<img class="lazy" src="/static/taoke/images/blank.gif" data-original="{:attach(get_thumb($item['pic_url'], '_m'),'item')}" style="display: inline;">
					</a>
				</div>
				<a href="{:U('jump/index',array('iid'=>$item['num_iid']))}" rel="nofollow" target="_blank">
					<p class="item-desc">{$item.title}</p>
					<div class="price-box">
						<span class="m-sign">¥</span>
						<span class="price">{$item.coupon_price}</span>
						<!--<span class="discount">({$item.zk}折)</span>-->
						<span class="ori-price">¥{$item.price}</span>
					</div>
				</a>
			</li>
		</volist>
		</ul>
    </div>
</div>
<div class="clear"></div>
<notempty name="page">
<div class="pagination tuan-before-page">
	{$page}<span class="enhanced_tip">&nbsp;</span>
</div>
</notempty>

<style>
.m-recommend .title {background-color: #F4F4F4;}
.m-recommend-item {height: 212px;}
.m-recommend-item .promo, .m-recommend-item .img {height: 131px;}
.m-recommend-item .promo img {height: 131px;}
</style>
<!-- 专场推荐： 您可能喜欢的特卖专场 -->
<div class="m-recommend wrapper">
	<div class="line"></div>
    <h3 class="title">您可能喜欢的特卖专场</h3>
    <div class="m-show-body">
	<volist name="brands" id="val" key="ii" mod="3">
		<a class="m-recommend-item" <eq name="mod" value="2">style="margin-right:0;"</eq> href="{:U('brand/view',array('id'=>$val['id']))}" title="{$val.title}特卖专场"  target="_blank">
			<span class="promo">
				<img class="lazy" src="/static/taoke/images/blank.gif" data-original="{$val['newpic']}" alt="{$val.title}特卖专场" style="display: inline;">
				<span class="mj-promotion-back"></span>
				<span class="mj-promotion">
					<span>{$val.discount}</span>
				</span>
			</span>
			<span class="info">
				<span class="info-price">
					<span class="f-price-font"></span>
				</span>
				<span class="name">{$val.title} 特卖专场</span>
			</span>
			<span class="remaining-time">
				<i class="iconfont">&#xe71b;</i> 
				<if condition="$val['start_time'] egt time()">
					活动开始时间：
					<span class="endtime" data-time="{$val['start_time']}" data-id="x{$ii}" id="end_date_x{$ii}">{$val.ostime|date="m月d日 H时i分",###}</span>
				<else />
					本场剩余：
					<span class="endtime" data-time="{$val['end_time']}" data-id="x{$ii}" id="end_date_x{$ii}">{$val.oetime|date="m月d日 H时i分",###}</span>
				</if>
			</span>
		</a>
	</volist>
	</div>
</div>


</div>

<script type="text/javascript">
	function getTime(){
        $(".endtime").each(function () {
		var end = $(this).attr('data-time');
		var style = 2;
		var id = $(this).attr('data-id');

		today=new Date(); 
		timeold=((end)*1000-today.getTime()); 
		if (timeold < 0) {
			$("#end_date_"+id).html("已结束!");
			return;
		} 
		sectimeold=timeold/1000;
		secondsold=Math.floor(sectimeold); 
		msPerDay=24*60*60*1000;
		e_daysold=timeold/msPerDay;
		daysold=Math.floor(e_daysold); 
		e_hrsold=(e_daysold-daysold)*24;
		hrsold=Math.floor(e_hrsold); 
		e_minsold=(e_hrsold-hrsold)*60;
		minsold=Math.floor((e_hrsold-hrsold)*60); 
		e_seconds = (e_minsold-minsold)*60;
		seconds=Math.floor((e_minsold-minsold)*60); 
		ms = e_seconds-seconds;
		ms = new String(ms);
		ms1 = ms.substr(2,1);
		ms2 = ms.substr(2,1);
		hrsold1=daysold*24+hrsold;
		if(style == 1){
			$("#end_date_"+id).html((hrsold1<10?'0'+hrsold1:hrsold1)+"小时"+(minsold<10?'0'+minsold:minsold)+"分"+(seconds<10?'0'+seconds:seconds)+"秒");
		}else if(style == 2){
			if(daysold>0){
				$("#end_date_"+id).html("<i>"+daysold+"</i>天<i>"+(hrsold<10?'0'+hrsold:hrsold)+"</i>时<i>"+(minsold<10?'0'+minsold:minsold)+"</i>分<i>"+(seconds<10?'0'+seconds:seconds)+"."+ms2+"</i>秒");
			}else{
				$("#end_date_"+id).html("<i>"+(hrsold<10?'0'+hrsold:hrsold)+"</i>时<i>"+(minsold<10?'0'+minsold:minsold)+"</i>分<i>"+(seconds<10?'0'+seconds:seconds)+"."+ms2+"</i>秒");
			}
		}else if(style == 3){
			$("#end_date_"+id).html((hrsold1<10?'0'+hrsold1:hrsold1)+"小时"+(minsold<10?'0'+minsold:minsold)+"分"+(seconds<10?'0'+seconds:seconds)+"."+ms1+"秒");
		}else if(style == 4){
			if(daysold>0){
				$("#end_date_"+id).html(daysold+"天"+(hrsold<10?'0'+hrsold:hrsold)+"时"+(minsold<10?'0'+minsold:minsold)+"分");
			}else{
				$("#end_date_"+id).html((hrsold1<10?'0'+hrsold1:hrsold1)+"小时"+(minsold<10?'0'+minsold:minsold)+"分");
			}
		}else{
			$("#end_date_"+id).html(daysold+"天"+(hrsold<10?'0'+hrsold:hrsold)+"小时"+(minsold<10?'0'+minsold:minsold)+"分"+(seconds<10?'0'+seconds:seconds)+"秒."+ms2);
		}
            });
        }
        setInterval("getTime()",100);
    </script> 
<include file="public:footer" />
</body>
</html>